# Read File Into Vector
snippet readfile
	std::vector<char> v;
	if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) {
		char buf[1024];
		while (size_t len = fread(buf, 1, sizeof(buf), $2))
			v.insert(v.end(), buf, buf + len);
		fclose($2);
	}${3}
# std::map
snippet map
	std::map<${1:key}, ${2:value}> map${3};
# std::vector
snippet vector
	std::vector<${1:char}> v${2};
snippet vi
	std::vector<int> ${1:vi};
snippet vs
	std::vector<std::string> ${1:vs};
snippet vd
	std::vector<double> ${1:vd};
# Namespace
snippet ns
	namespace ${1:`Filename('', 'my')`} {
		${2}
	} /* $1 */
# Class
snippet cl
	class ${1:`Filename('$1_t', 'name')`} {
	public:
		$1 (${2:arguments});
		virtual ~$1 ();
	
	private:
		${3:/* data */}
	};
# Begin End
snippet beginend
	${1:iter}.begin(), $1.end()${2}
# Fast Header
snippet fastHeader
	#include <map>
	#include <set>
	#include <cmath>
	#include <queue>
	#include <vector>
	#include <string>
	#include <cstdio>
	#include <cstdlib>
	#include <cstring>
	#include <cassert>
	#include <numeric>
	#include <algorithm>
	#include <iostream>
	#include <sstream>
	#include <ctime>
	using namespace std;

	typedef long long int64;

	#define _CRT_SECURE_NO_WARNINGS
	#define Fill(a,c) memset(&a, c, sizeof(a))
	#define MP(x, y) make_pair((x), (y))

	template<typename T, typename S> T cast(S s) {
		stringstream ss;
		ss << s;
		T res;
		ss >> res;
		return res;
	}

	template<typename T> inline T sqr(T a) { return a*a; }
	template<typename T> inline int Size(const T& c) { return (int)c.size(); }
	template<typename T> inline void checkMin(T& a, T b) { if (b < a) a = b; }
	template<typename T> inline void checkMax(T& a, T b) { if (b > a) a = b; }

